function count() {

  //获取第一个输入框的值
  var a = parseInt(document.getElementById("txt1").value);
  //获取第二个输入框的值
  var b = parseInt(document.getElementById("txt2").value);
  //获取选择框的值
  var option = document.getElementById("select").value;
  console.log(option);
  //获取通过下拉框来选择的值来改变加减乘除的运算法则
  switch (option) {
    case "+":
      document.getElementById("fruit").value = add(a, b);
      break;
    case "-":
      document.getElementById("fruit").value = minus(a, b);
      break;
    case "*":
      document.getElementById("fruit").value = multiply(a, b);
      break;
    case "/":
      document.getElementById("fruit").value = divs(a, b);
      break;
  }
}

function add(a, b) {
  return a+b;
}
function minus(a, b){
}
function multiply(a,b) {
}
function divs(a,b) {
}